from selenium.webdriver.common.by import By
from pages.base_page import BasePage
"""客户页面做的操作"""
class ClientPage(BasePage):
    click_add_client_locator = (By.CSS_SELECTOR, 'body > div.container > div.row > div:nth-child(1) > div > a')
    click_contacts_locator = (By.CSS_SELECTOR, 'body > div.container > div.page-header > ul > li:nth-child(3) > a')
    # 定位客户统计按钮
    click_client_count_locator = (By.CSS_SELECTOR, 'body > div.container > div.page-header > ul > li:nth-child(5) > a')

    def click_add_client(self):
        '''点击新建客户'''
        self.driver.find_element(*self.click_add_client_locator).click()

    def click_contacts(self):
        '''点击联系人'''
        self.driver.find_element(*self.click_contacts_locator).click()

    def click_client_count(self):
        '''客户统计'''
        self.driver.find_element(*self.click_client_count_locator).click()



